<!--
 * @Description: 
 * @Author: 若城
 * @Date: 2023-03-29 23:44:45
 * @LastEditTime: 2023-03-30 00:25:29
-->
<template>
  <view>
    <u-image
      width="750rpx"
      height="74rpx"
      src="/static/titlebg.png"
      mode="widthFix"
    ></u-image>
    <u-tabs
      :lineHeight="7"
      :activeStyle="{
        color: '#3a70ea',
        fontSize: '25rpx',
        paddingBottom: '10rpx',
      }"
      :inactiveStyle="{
        color: '#4e4e4e',
        fontSize: '25rpx',

        paddingBottom: '10rpx',
      }"
      :list="list1"
    ></u-tabs>
    <u-list>
      <u-list-item v-for="(item, index) in indexList" :key="index">
        <u-cell @click="handleCell(item)" :title="item"></u-cell>
      </u-list-item>
    </u-list>
  </view>
</template>
<script>
export default {
  onLoad: function (option) {
    //option为object类型，会序列化上个页面传递的参数
    // console.log(option.id); //打印出上个页面传递的参数。
    // console.log(option.name); //打印出上个页面传递的参数。
    this.list1.push({
      name: option.ads,
      disabled: true,
    });
  },
  data() {
    return {
      optWord: "",
      indexList: [
        "福州市",
        "厦门市",
        "漳州市",
        "泉州市",
        "三明市",
        "莆田市",
        "南平市",
        "龙岩市",
        "宁德市",
        "平潭综合实验区",
        "福州鼓楼区",
        "泉州丰泽区",
      ],
      list1: [
        {
          name: "福建省",
        },
      ],
    };
  },
  methods: {
    handleCell(item) {
    //   console.log("🚀 ~ file: address.vue:75 ~ handleCell ~ item:", item);
    //   this.$set( this.list1[1], name, item)
    //   this.list1 = [
    //     {
    //       name: "福建省",
    //     },
    //     {
    //       name: item,
    //       disabled: true,
    //     },
    //   ];
    uni.navigateTo({
            url: `/pages/index/index?ads=${item}`,
            animationType: 'pop-in',
	animationDuration: 200
          });
    },
  },
};
</script>